﻿using Model.Repositories.Group;
using Model.Repositories.Interest;
using Model.Repositories.Message;
using Model.Repositories.User;

namespace Model.Repositories
{
    public class RepositoryManager
    {
        #region Singleton

        private RepositoryManager()
        {
        }

        private static RepositoryManager _instance = new RepositoryManager();

        public static RepositoryManager Instance
        {
            get { return _instance ?? (_instance = new RepositoryManager()); }
        }

        #endregion

        private UserRepository _userRepository;
        public UserRepository UserRepository
        {
            get { return _userRepository ?? (_userRepository = new UserRepository()); }
        }

        private GroupRepository _groupRepository;
        public GroupRepository GroupRepository
        {
            get { return _groupRepository ?? (_groupRepository = new GroupRepository()); }
        }

        private InterestRepository _interestRepository;
        public InterestRepository InterestRepository
        {
            get { return _interestRepository ?? (_interestRepository = new InterestRepository()); }
        }

        private GroupMessageRepository _groupMessageRepository;
        public GroupMessageRepository GroupMessageRepository
        {
            get { return _groupMessageRepository ?? (_groupMessageRepository = new GroupMessageRepository()); }
        }

        private UserMessageRepository _userMessageRepository;
        public UserMessageRepository UserMessageRepository
        {
            get { return _userMessageRepository ?? (_userMessageRepository = new UserMessageRepository()); }
        }

        private DiaryMessageRepository _diaryMessageRepository;
        public DiaryMessageRepository DiaryMessageRepository
        {
            get { return _diaryMessageRepository ?? (_diaryMessageRepository = new DiaryMessageRepository()); }
        }
    }
}
